package com.example.springdemo.mvc;

import java.util.HashMap;

public class test {
    public static void main(String[] args) {
        HashMap<String,User> hashMap = new HashMap<>();
        User user1 = new User();
        user1.setUserName("第一个username");
        user1.setUserAge("222");
        hashMap.put("666",user1);
        System.out.println(hashMap.get("666").toString());

        HashMap<String,User> hashMap2 = new HashMap<>();
        User user2 = new User();
        user2.setUserName(hashMap.get("666").getUserName());
        user2.setUserAge(hashMap.get("666").getUserAge());

        hashMap2.put("666",user2);

        hashMap2.get("666").setUserAge("第二个useen");
        System.out.println(hashMap.get("666").toString());
        System.out.println(hashMap2.get("666").toString());



    }
}
